package _8

/*
时间复杂度：O(mn)
空间复杂度：O(1)

*/
func mostWordsFound(sentences []string) int {
	var result int
	for _, sentence := range sentences {
		count := 1
		for i := range sentence {
			if sentence[i] == ' ' {
				count++
			}
		}
		if result < count {
			result = count
		}
	}
	return result
}
